package wexin.web.controll.original;

import java.util.ArrayList;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import wexin.web.jpa.domain.Customer;
import wexin.web.jpa.domain.Gender;
import wexin.web.jpa.domain.PaymentMethod;

@Controller	
public class OriginalController {
	@RequestMapping("/exercise06")
	public ModelAndView getProductList() {
		Customer customer = new Customer(3, "dsadf", "sdfa", Gender.FEMALE, PaymentMethod.BANK_TRANSFER, 312, "www");
		List<Customer> lists = new ArrayList<Customer>();
		lists.add(customer);
		Page<Customer> pp = new PageImpl<Customer>(lists);
		return new ModelAndView("exercise06", "customerList", pp);
	}
}
